# vi: set ts=8 sw=8 sts=8 noexpandtab:

.EXPORT_ALL_VARIABLES:


VERSION                 := 0.0.1

TARGET                  := simplios.img
ELF_TARGET              := simplios.elf
SUBDIRS                 := kernel
TOPDIR                  := $(shell /bin/pwd)

###########################################

include                 $(TOPDIR)/Config.mk


all: compile $(TARGET)


$(ELF_TARGET): $(addsuffix /built-in.o,$(SUBDIRS))
	$(LD) $(LDFLAGS) $(LDSCRIPT) -o $@
	$(NM) $(ELF_TARGET) | egrep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > Symbols.map

$(TARGET): $(ELF_TARGET)
	$(OBJCOPY) $(OFLAGS) -o $@ $< 

include $(TOPDIR)/Rules.mk




